<template>
    <div>
		<van-nav-bar
		  title="设置"
		  left-text="返回"
		  @click-left="onClickLeft"
		  left-arrow
		>
		</van-nav-bar>
		<van-cell style='background-color: #CCCCCC;' title="账号管理" size="large" />
		<van-cell title="个人资料"   size="large" is-link @click='gerenzl()'/>
		<van-cell title="收货地址"  size="large" is-link @click='dizhilb()'/>
		<van-cell title="关于" style='background-color: #CCCCCC;' size="large" />
		<van-cell title="关于商城"  size="large" is-link/>
		<van-cell title="意见反馈"  size="large" is-link/>
		<van-cell title="协议规则"  size="large" is-link/>
		<van-cell title="资质证件"  size="large" is-link/>
		<van-cell title="用户协议"  size="large" is-link/>
		<van-cell title="隐私政策"  size="large" is-link/>
		<div class="loginOutSty">
			 <button @click="loginOut" class="divbtn">退出登录</button>
		</div>
       
    </div>
</template>
<script>
import { mapMutations } from 'vuex'
import api from '../lib/api'
export default{
methods:{
    ...mapMutations(['loginout']),
    loginOut(){
          this.loginout();
		  console.log("d")
        api.post('/logout',{checkToken:true}).then(res=>{
            if (res.msg==='ok') {
                this.$router.push({
                    name:'Login'
                })
            }
        })
    },
	dizhilb(){
		this.$router.push({
		  name: "dizhiym",
		});
	},

	onClickLeft() {
	  this.$router.go(-1)
	},
	gerenzl(){
		this.$router.push({
		  name: "Gerenzl",
		});
	}
}
}
</script>
<style>
	.loginOutSty{
		width: 100%;
		text-align: center;
	}
	.divbtn{
		width: 80%;
		text-align: center;
		height:2.5rem;
		margin-top: 1rem;
	}
</style>
